<?php
header("Access-Control-Allow-origin:*");

$page = $_POST["page"] ? $_POST["page"] : 1;
$pagesize = $_POST["pagesize"] ? $_POST["pagesize"] : 20;
$arr = [];
$resArr = [];
$start = ($page - 1) * $pagesize + 1;
$end = $page * $pagesize;

if ($page == 5) {
    $end = $page * $pagesize - 5;
}

$randon=1;
if(!!$randon){
	for ($i = $start; $i <= $end; $i++) {
        $arr["lists"][] = array(
            "id" => $i,
            "name" => "产品名称" . $i,
            "brokerage_title" => $i,
            "cover"=>"https://wnworld.com/uploads/jjd/01.jpg"
        );

    }
}else{
	$arr["lists"]=[];
}

$resArr["code"]=200;
$resArr["data"]=$arr;




echo json_encode($resArr);

?>